﻿/**
 * @file guild_dump.hpp
 * @date 2021/05/12 16:01
 *
 * @author harrybao (harrybao@123u.com)
 *
 * @brief 公会打印
 *
 * @version v1.0.0
 *
 * @copyright Copyright © 2021 All Rights Reserved 上海欢乐互娱网络科技有限公司
 *
 * @par history:
 * <table>
 * <tr><th>Date                     <th>Version     <th>Author <th>Description
 * <tr><td>2021/05/12 16:01         <td>1.0.0       <td>harrybao
 * <td>创建初始版本
 * </table>
 */

// #ifndef GUILD_DUMP_HPP
// #define GUILD_DUMP_HPP

#pragma once

#include <cassert>
#include <cstdio>
#include <cinttypes>

#include "guild/guild.h"
#include "guild/module/guild_module.h"

namespace guild_service {

/**
 * @brief
 *
 * @param guild
 * @return const std::string
 */
static const std::string DumpGuild(const Guild &guild) {
  static char buf[128];
  int offset = snprintf(buf, sizeof(buf), "公会id:%" PRIu64 " 模块池id:%zu", guild.id,
                        guild.pool_index);

  assert(offset > 0);

  if (offset <= 0) {
    return "";
  }
  return buf;
}

/**
 * @brief
 *
 * @param guild_brief
 * @return const std::string
 */
// static
// const std::string DumpGuildBrief(const GuildBrief &guild_brief)
// {
//     static char buf[256];
//     int offset = snprintf(buf,
//         sizeof(buf),
//         "公会名:%s 公会等级:%u",
//         guild_brief.name.c_str(), guild_brief.level);

//     assert(offset > 0);

//     if (offset <= 0)
//     {
//         return "";
//     }
//     return buf;
// }

}  // namespace guild_service

// #endif  // GUILD_DUMP_H